<?
if(!empty($grading_period_data)){
	foreach($grading_period_data as $gpd){
		$gp_code_val = set_value('gp_code') == FALSE ? $gpd->gp_code : set_value('gp_code');
		$gp_desc_val = set_value('gp_desc') == FALSE ? $gpd->gp_desc : set_value('gp_desc');
		$gp_stat_val = set_select('gp_stat') == FALSE ? $gpd->gp_stat : set_select('gp_stat');
		$gp_id = $gpd->gp_id;
	}
		$hd_att = array('gp_id'=> $gp_id);
		$gpc_att = array('name'=>'gp_code','value'=>$gp_code_val);
		$gpd_att = array('name'=>'gp_desc','value'=>$gp_desc_val);
		$frm_att = array('class'=>'admin-form');
		$gps_options = array(''=>'select status','active'=>'Active','inactive'=>'Inactive');
}else{
	
}		
?>
	<div class="row">
	<div class="panel callout">
		<h6>Update Grading Period</h6>
	</div>
	<?if(isset($system_message))echo $system_message;
	echo validation_errors('<div class="error">', '</div>');
	?>
		<?echo form_open('admin/update_grading_period',$frm_att);?>
		
		<div class="row">
		<div class="large-4 columns">
			<?
				echo form_label('Code');
				echo form_input($gpc_att);
			?>
		</div>
		</div>
		<div class="row">
		<div class="large-4 columns">
			<?
				echo form_label('Description');
				echo form_input($gpd_att);
			?>
		</div>
		</div>
		<div class="row">
		<div class="large-4 columns">
			<?
				echo form_label('Status','Level Desc');
				echo form_dropdown('gp_stat',$gps_options,$gp_stat_val);
			?>
		</div>
		</div>
		<div class="row">
		<div class="large-4 columns">
			<?
				echo form_hidden($hd_att);
				echo form_submit('update_grading_period','Update');
				echo form_close();
			?>
		</div>
		</div>
	</div>